package bsts.view.user;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

import bsts.application.BSTSApplication;

public class TransactionTabPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	private BSTSApplication manager;
	private JPanel pnlMain;

	private JButton btnViewTransactions;

	private ActionListener actlis_btnViewTransactions;

	public TransactionTabPanel(BSTSApplication manager) {
		this.manager = manager;

		pnlMain = new JPanel();
		pnlMain.setLayout(new GridLayout(9, 1, 0, 10));

		btnViewTransactions = new JButton("View Transactions");

		pnlMain.add(btnViewTransactions);
		this.add(pnlMain);

		initActionListener();
	}

	private void initActionListener() {
		actlis_btnViewTransactions = new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				manager.getViewManager().showViewTransactionsWindow();
			}
		};

		btnViewTransactions.addActionListener(actlis_btnViewTransactions);
	}

}
